package GlobleService;

import javax.swing.*;
import java.io.File;

/**
 * <p> TODU </P>
 *
 * @author yeager
 * @Version V1.1.1.0
 * @date 2023/11/24 10:32
 */
public class SGlobalFunctionEx {
    public static ImageIcon getImageIcon(String name) {
        File f=new File(name);
        if(f.exists())
            return new ImageIcon(name);
        return new ImageIcon(name);
    }

    public static ImageIcon getConsiderSkinImageIcon(String path) {
        String old_name=path;
        File f=new File(path);
        if(!f.exists())
        {
            System.err.print(path + ": not exists");
            return null;
        }
        return new ImageIcon(path);
    }
}
